home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94c.txt / 000010_icon-group-sender _Fri Dec 16 15:51:50 1994.msg < prev    next >
Internet Message Format  |  1995-02-09  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Fri, 16 Dec 1994 09:32:02 MST
  2. To: icon-group-l@cs.arizona.edu
  3. Date: Fri, 16 Dec 1994 15:51:50 GMT
  4. From: dkuhlman@netcom.com (G. David Kuhlman)
  5. Message-Id: <dkuhlmanD0wuqE.I5w@netcom.com>
  6. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  7. Sender: icon-group-request@cs.arizona.edu
  8. Subject: Backtracking in Icon
  9. Errors-To: icon-group-errors@cs.arizona.edu
  10.  
  11. An article in the latest "Icon Analyst" reported frequency of use
  12. of various control structures in Icon programs, but backtracking
  13. was mentioned only briefly.  When I first learned about
  14. backtracking and goal seeking behavior in Icon I thought,
  15. "Wow.  Now I can have backtracking like I had in Prolog, AND
  16. I don't have to try to write loops and if statements in
  17. screwy ways."
  18.  
  19. But now, in spite of the fact that I have a language
  20. with a strong backtracking mechanism, I find that I
  21. don't use it much, except of course, for trivial
  22. constructs like:
  23.  
  24.     (checkValid(x) | write("error"))
  25.  
  26. which I feel I have to write instead of an
  27. 'if' statement so that I can feel like a cool Icon
  28. programmer.
  29.  
  30. Anyway, I'd be interested to know if others use backtracking
  31. more heavily, or whether maybe this is just a "neat" but
  32. not so useful feature of Icon.
  33.  
  34. Or, could it be that the fact that Icon does not have logical
  35. variables, as Prolog does, make backtracking and goal seeking
  36. evaluation less usable?
  37.  
  38. -- 
  39. ----------------------
  40. Dave Kuhlman
  41. Reify, Redwood City, CA
  42. Internet:   dkuhlman@netcom.com
  43. ----------------------